package com.niit.agricstore.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.niit.agricstore.entity.Item;
import com.niit.agricstore.entity.User;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

public interface ItemService extends IService<Item> {
    //库存service
    List<Item> selectByItemId(@Param("itemId") int itemId);
    PageInfo<Item> findItemAllByPage(Integer pageNum, Integer pageSize);
    List<Item> findAllByItemCategory(@Param("itemCategory") String itemCategory);
    List<Item> findItemStockAndItemShelfLifeByItemId(@Param("itemId") int itemId);
    List<Item> findItemUnitPriceByItemId(@Param("itemId") int itemId);
    int insertAll(Item item);
    int delByItemId(@Param("itemId") int itemId);
    int updateItemStockAndItemProductionDateByItemId(@Param("itemStock") int itemStock, @Param("itemProductionDate") Date itemProductionDate, @Param("itemId") int itemId);
    int updateItemUnitPriceByItemId(@Param("itemUnitPrice") BigDecimal itemUnitPrice, @Param("itemId") int itemId);

}
